#ifndef FENIMPRIMERFACTURE_H
#define FENIMPRIMERFACTURE_H

#include <QDialog>
#include <QStringListModel>
#include <QPrintDialog>
#include <QPrinter>
#include <QPainter>
#include <QTextEdit>
#include <QTextTable>
#include <QFileDialog>
#include <QTextStream>
#include "ui_fenimprimerfacture.h"
#include "listeeleve.h"
#include "listeelevemodel.h"
#include "Tools/impressionfacture.h"

namespace Ui {
    class FenImprimerFacture;
}

class FenImprimerFacture : public QDialog, public Ui::FenImprimerFacture
{
    Q_OBJECT

public:
    explicit FenImprimerFacture(ListeEleve &listeEleve,Prof ProfConnect,bool ProfConnectEtat, QWidget *parent = 0);
    ~FenImprimerFacture();

    void setEleve(int indexEleve);

public slots:
    void ReceptionListeEleveEtProfConnecte();
    void ReceptionListeEleveEtProfConnecte(ListeEleve&, Prof, bool, Eleve);
    void AfficherRien();
    void AfficherListeEleve();
    void AfficherJourSemaine();
    void BtnAnnuler();
    void EtatCotisation(bool etat);
    void EtatDetailMoisPrecedents(bool etat);
    void LancerImpression();
    void ExportPDF();
    void ExportRTF();
//    void ClicList(QListWidgetItem*);

private:
    Ui::FenImprimerFacture *ui;
    ListeEleve *m_ListeEleve;
    ListeEleve maListeAImprimer;
    ListeEleveModel *m_modelListeEleve;
    QStandardItemModel *m_modelSemaine;
    Eleve m_eleveAImprimer;

    bool Cotisation;
    bool DetailMoisPrecedents;
    ImpressionFacture::TypeImpression ModeImpression;
    ListeEleve ListeAImprimer()const;
};

#endif // FENIMPRIMERFACTURE_H
